import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home'
import Friends from '../views/Friends'
import Cart from '../views/Cart'
import Search from '../views/Search'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    component: Home,
    meta: {
      title: 'home'
    }
  },
  {
    path: '/friends',
    component: Friends,
    meta: {
      title: 'friends'
    }
  },
  {
    path: '/cart',
    component: Cart,
    meta: {
      title: 'cart'
    }
  },
  {
    path: '/search',
    component: Search,
    meta: {
      title: 'search'
    }
  }
]

const router = new VueRouter({
  routes,
  watch: {

  }
})

export default router
